Begin A1_DAT_SRT_RestoreHLT_IDS

Short DAT_SRTIC
Short DAT_SRTFIN

If ( OnActivate == 1 )
	Set DAT_SRTFIN to 2
EndIf

If ( DAT_SRTFIN < 2 )
	Return
EndIf

If ( Player->GetAlchemy >= 5 )
	Set DAT_SRTIC to (  "A1_DAT_SRT_SortBag"->GetItemCount, "ingred_marshmerrow_01" )
Else
	Set DAT_SRTIC to 0
EndIf

If ( DAT_SRTIC > 0 )
	While ( DAT_SRTIC > 0 )
		Set DAT_SRTIC to ( DAT_SRTIC - 1 )
		Player->AddItem, "ingred_marshmerrow_01", 1
		 "A1_DAT_SRT_SortBag"->RemoveItem, "ingred_marshmerrow_01", 1
	EndWhile
EndIf

If ( Player->GetAlchemy >= 15 )
	Set DAT_SRTIC to (  "A1_DAT_SRT_SortBag"->GetItemCount, "ingred_resin_01" )
Else
	Set DAT_SRTIC to 0
EndIf

If ( DAT_SRTIC > 0 )
	While ( DAT_SRTIC > 0 )
		Set DAT_SRTIC to ( DAT_SRTIC - 1 )
		Player->AddItem, "ingred_resin_01", 1
		 "A1_DAT_SRT_SortBag"->RemoveItem, "ingred_resin_01", 1
	EndWhile
EndIf

If ( Player->GetAlchemy >= 5 )
	Set DAT_SRTIC to (  "A1_DAT_SRT_SortBag"->GetItemCount, "ingred_wickwheat_01" )
Else
	Set DAT_SRTIC to 0
EndIf

If ( DAT_SRTIC > 0 )
	While ( DAT_SRTIC > 0 )
		Set DAT_SRTIC to ( DAT_SRTIC - 1 )
		Player->AddItem, "ingred_wickwheat_01", 1
		 "A1_DAT_SRT_SortBag"->RemoveItem, "ingred_wickwheat_01", 1
	EndWhile
EndIf

If ( Player->GetAlchemy >= 5 )
	Set DAT_SRTIC to (  "A1_DAT_SRT_SortBag"->GetItemCount, "ingred_corkbulb_root_01" )
Else
	Set DAT_SRTIC to 0
EndIf

If ( DAT_SRTIC > 0 )
	While ( DAT_SRTIC > 0 )
		Set DAT_SRTIC to ( DAT_SRTIC - 1 )
		Player->AddItem, "ingred_corkbulb_root_01", 1
		 "A1_DAT_SRT_SortBag"->RemoveItem, "ingred_corkbulb_root_01", 1
	EndWhile
EndIf

If ( Player->GetAlchemy >= 30 )
	Set DAT_SRTIC to (  "A1_DAT_SRT_SortBag"->GetItemCount, "ingred_emerald_01" )
Else
	Set DAT_SRTIC to 0
EndIf

If ( DAT_SRTIC > 0 )
	While ( DAT_SRTIC > 0 )
		Set DAT_SRTIC to ( DAT_SRTIC - 1 )
		Player->AddItem, "ingred_emerald_01", 1
		 "A1_DAT_SRT_SortBag"->RemoveItem, "ingred_emerald_01", 1
	EndWhile
EndIf

If ( Player->GetAlchemy >= 60 )
	Set DAT_SRTIC to (  "A1_DAT_SRT_SortBag"->GetItemCount, "ingred_corprus_weepings_01" )
Else
	Set DAT_SRTIC to 0
EndIf

If ( DAT_SRTIC > 0 )
	While ( DAT_SRTIC > 0 )
		Set DAT_SRTIC to ( DAT_SRTIC - 1 )
		Player->AddItem, "ingred_corprus_weepings_01", 1
		 "A1_DAT_SRT_SortBag"->RemoveItem, "ingred_corprus_weepings_01", 1
	EndWhile
EndIf

If ( Player->GetAlchemy >= 60 )
	Set DAT_SRTIC to (  "A1_DAT_SRT_SortBag"->GetItemCount, "ingred_raw_Stalhrim_01" )
Else
	Set DAT_SRTIC to 0
EndIf

If ( DAT_SRTIC > 0 )
	While ( DAT_SRTIC > 0 )
		Set DAT_SRTIC to ( DAT_SRTIC - 1 )
		Player->AddItem, "ingred_raw_Stalhrim_01", 1
		 "A1_DAT_SRT_SortBag"->RemoveItem, "ingred_raw_Stalhrim_01", 1
	EndWhile
EndIf

If ( Player->GetAlchemy >= 5 )
	Set DAT_SRTIC to ( "A1_DAT_SRT_SortBag"->GetItemCount, "ingred_saltrice_01" )
Else
	Set DAT_SRTIC to 0
EndIf

If ( DAT_SRTIC > 0 )
	While ( DAT_SRTIC > 0 )
		Set DAT_SRTIC to ( DAT_SRTIC - 1 )
		Player->AddItem, "ingred_saltrice_01", 1
		 "A1_DAT_SRT_SortBag"->RemoveItem, "ingred_saltrice_01", 1
	EndWhile
EndIf

If ( Player->GetAlchemy >= 60 )
	Set DAT_SRTIC to ( "A1_DAT_SRT_SortBag"->GetItemCount, "ingred_sweetpulp_01" )
Else
	Set DAT_SRTIC to 0
EndIf

If ( DAT_SRTIC > 0 )
	While ( DAT_SRTIC > 0 )
		Set DAT_SRTIC to ( DAT_SRTIC - 1 )
		Player->AddItem, "ingred_sweetpulp_01", 1
		 "A1_DAT_SRT_SortBag"->RemoveItem, "ingred_sweetpulp_01", 1
	EndWhile
EndIf

PlaySound "Item Misc Up"

MessageBox "You take what ingredients you determine can be used to create a potion of Restore Health from the bag.",

Set DAT_SRTFIN to 1

End